<template>
  <el-container style="height: 100%; border: 1px solid #eee">
    <el-aside :width="aside_witdh" style="height: 100vh;background-color: rgb(238, 241, 246);margin-left: -1px">
      <Aside :isCollapse="isCollapse"></Aside>
    </el-aside>

    <el-container style="height: 100%">
      <el-header
          style="text-align: right; font-size: 12px;height: 70px;border-bottom: rgba(169,169,169,0.3) 1px solid;">
        <Header @doCollapse="doCollapse" :icon="icon"></Header>
      </el-header>
      <el-main style="height: 100% ">
        <router-view/>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
import Aside from "@/components/home/Aside";
import Header from "@/components/home/Header";
import Ll from "@/components/ll";

export default {
  name: "Index",
  components: {Ll, Header, Aside},
  data() {
    return {
      isCollapse: false,
      aside_witdh: '200px',
      icon: 'el-icon-s-fold'
    }
  },
  methods: {
    doCollapse() {
      this.isCollapse = !this.isCollapse
      if (!this.isCollapse) {//展开
        this.aside_witdh = '200px'
        this.icon = 'el-icon-s-fold'
      } else {//关闭收起
        this.aside_witdh = '64px'
        this.icon = 'el-icon-s-unfold'
      }
    }
  },
  created() {

  }
}
</script>

<style scoped>
.el-header {
  #background-color: #B3C0D1;
  color: #333;
  line-height: 60px;
}
.el-container{
  font-size:26px;
}
.el-main {
  padding: 5px;
}

.el-aside {
  color: #333;
}
</style>